package puf3

import chisel3._
import chisel3.util._
import chisel3.experimental._

import puf3._ 
import puf3.PUF_Constants._


class Clk_Mux_IO extends Bundle{
    val clk     =   Input(Clock())
    val enable  =   Input(Bool())
    val clk_out =   Output(Bool())  
}

class Clk_Mux extends BlackBox with HasBlackBoxResource{
    val io = IO(new Clk_Mux_IO)
    addResource("/clk_mux.v")
}


class Clk_Divider_IO extends Bundle{
    val clk     =   Input(Clock())
    val rst_p   =   Input(Bool())
    val clk_div =   Output(Clock())
}

class clk_divider extends BlackBox(Map(
    "NUM_DIV"   ->  100,
    "CNT_LEN"   ->  8
)) with HasBlackBoxResource{
    val io = IO(new Clk_Divider_IO)
    addResource("/clk_divider.v")
}